<template name="Inbox">
  {{#contentFor "menu"}}
    {{> InboxMenu}}
  {{/contentFor}}

  {{#Layout template="InboxLayout" hasRight=hasRight hasSidebar=hasSidebar}}
    {{> ThreadList}}

    {{> contentFor region="header" template="ThreadHeader" data=thread}}
    {{> contentFor region="right" template="Thread" data=thread}}
    {{#if hasSidebar}}
      {{> contentFor region="sidebar" template="ThreadDetail" data=thread}}
    {{/if}}
  {{/Layout}}
</template>

<template name="InboxMenu">
  <p class="navbar-text pull-left menu-title">{{_ 'app_inbox'}}</p>

  <div class="navbar-custom-menu">
    <ul class="nav navbar-nav">
      <li>{{> LinkToSendEmail}}</li>
    </ul>
  </div>
</template>

<template name="InboxMenuItem">
  <li class="{{#if inRouter 'inbox'}}active{{/if}}">
    <a href="/inbox">
      <i class="fa fa-inbox"></i> <span>{{_ 'app_inbox'}}</span>
      {{#if (count 'unread-inbox')}}
        <span class="pull-right-container">
          <span class="label label-danger pull-right">{{count 'unread-inbox'}}</span>
        </span>
      {{/if}}
    </a>
  </li>
</template>
